package com.chzc.fm.duotin.bean.home;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * 列的json
 *
 * Created by Administrator on 2016/6/24.
 */
public class RecommendColumn {


    /**
     * id : 299
     * title : Banner
     * type : fm_slide
     * row : 1
     * column : 6
     * href : duotin://forward/more/299
     * description : 推荐
     * nav : 推荐
     * image_url : http://c3.duotin.com/i1/DT/u4UYunMmr-NGwWaugw73fMc3IjHMEPkOnlQ9Ue0DfwQ.jpg
     * is_fixed : 1
     * image_width : 640
     * image_height : 350
     * redirect_words : 1
     * item_type :
     * redirect_value :
     * sub_title : 1
     */

    private int id;
    private String title;
    private String type;
    private int row;
    private int column;
    private String href;
    private String description;
    private String nav;
    private String image_url;
    private String is_fixed;
    private int image_width;
    private int image_height;
    private String redirect_words;
    private String item_type;
    private String redirect_value;
    private String sub_title;

    public static RecommendColumn objectFromData(String str) {

        return new Gson().fromJson(str, RecommendColumn.class);
    }

    public static List<RecommendColumn> arrayRecommendColumnFromData(String str) {

        Type listType = new TypeToken<ArrayList<RecommendColumn>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getRow() {
        return row;
    }

    public void setRow(int row) {
        this.row = row;
    }

    public int getColumn() {
        return column;
    }

    public void setColumn(int column) {
        this.column = column;
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getNav() {
        return nav;
    }

    public void setNav(String nav) {
        this.nav = nav;
    }

    public String getImage_url() {
        return image_url;
    }

    public void setImage_url(String image_url) {
        this.image_url = image_url;
    }

    public String getIs_fixed() {
        return is_fixed;
    }

    public void setIs_fixed(String is_fixed) {
        this.is_fixed = is_fixed;
    }

    public int getImage_width() {
        return image_width;
    }

    public void setImage_width(int image_width) {
        this.image_width = image_width;
    }

    public int getImage_height() {
        return image_height;
    }

    public void setImage_height(int image_height) {
        this.image_height = image_height;
    }

    public String getRedirect_words() {
        return redirect_words;
    }

    public void setRedirect_words(String redirect_words) {
        this.redirect_words = redirect_words;
    }

    public String getItem_type() {
        return item_type;
    }

    public void setItem_type(String item_type) {
        this.item_type = item_type;
    }

    public String getRedirect_value() {
        return redirect_value;
    }

    public void setRedirect_value(String redirect_value) {
        this.redirect_value = redirect_value;
    }

    public String getSub_title() {
        return sub_title;
    }

    public void setSub_title(String sub_title) {
        this.sub_title = sub_title;
    }
}
